package unicall.em.models.vo;

import unicall.em.models.Media;
import unicall.em.utils.StringUtil;

public class MediaQuery {
    //名称
    private String name;
    //类型
    private String category;
    
 
    public MediaQuery(){
        
    }


    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }


    
    public String getCategory() {
        return category;
    }


    public void setCategory(String category) {
        this.category = category;
    }


    public MediaSpec toSpec(){
        Media media = new Media();
        if(!StringUtil.isBlank(this.name)){
            media.setName(StringUtil.trim(this.name));
        }
        if(!StringUtil.isBlank(this.category)){
            media.setCategory(this.category);
        }
        return new MediaSpec(media);
    }
    
    
     
    
    


    
}
